package com.cloud.wms.ui.main.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @Author:Chen
 * @Date: 2021-01-18 18:24
 * @Description:
 */
public class TaskMenuEntity implements Parcelable {
    /**
     * taskCode	string
     * nullable: true
     * 任务编号
     * <p>
     * taskShortName	string
     * nullable: true
     * 任务简称
     * <p>
     * taskName	string
     * nullable: true
     * 任务名称
     * <p>
     * taskAttribute	integer($int32)
     * 任务属性
     * <p>
     * relationBillType	integer($int32)
     * 关联单据类型
     * <p>
     * businessTypeID	integer($int32)
     * 关联业务类型
     * <p>
     * executorType	integer($int32)
     * 执行对象类型
     * <p>
     * taskMode	integer($int32)
     * 任务模式
     * <p>
     * ifCountCorrectRate	integer($int32)
     * 是否统计正确率
     * <p>
     * ifCountPiece	integer($int32)
     * 是否计件
     * <p>
     * jobStationID	integer($int32)
     * 岗位
     * <p>
     * remark	string
     * nullable: true
     * 备注
     * <p>
     * collectionMode	integer($int32)
     * 领用模式
     * <p>
     * productCategory	integer($int32)
     * 生产组别
     * <p>
     * url	string
     * nullable: true
     * PDAurl
     */

    private String taskCode;
    private String taskShortName;
    private String taskName;
//    private int taskAttribute;
//    private int relationBillType;
//    private long businessTypeID;
    private int executorType;
//    private int taskMode;
    private int ifCountCorrectRate;
    private int ifCountPiece;
    private long jobStationID;
    private String remark;
//    private int collectionMode;
    private int productCategory;
    private String url;

    public String getTaskCode() {
        return taskCode == null ? "" : taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    public String getTaskShortName() {
        return taskShortName == null ? "" : taskShortName;
    }

    public void setTaskShortName(String taskShortName) {
        this.taskShortName = taskShortName;
    }

    public String getTaskName() {
        return taskName == null ? "" : taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

//    public int getTaskAttribute() {
//        return taskAttribute;
//    }
//
//    public void setTaskAttribute(int taskAttribute) {
//        this.taskAttribute = taskAttribute;
//    }
//
//    public int getRelationBillType() {
//        return relationBillType;
//    }
//
//    public void setRelationBillType(int relationBillType) {
//        this.relationBillType = relationBillType;
//    }
//
//    public long getBusinessTypeID() {
//        return businessTypeID;
//    }
//
//    public void setBusinessTypeID(long businessTypeID) {
//        this.businessTypeID = businessTypeID;
//    }

    public int getExecutorType() {
        return executorType;
    }

    public void setExecutorType(int executorType) {
        this.executorType = executorType;
    }

//    public int getTaskMode() {
//        return taskMode;
//    }
//
//    public void setTaskMode(int taskMode) {
//        this.taskMode = taskMode;
//    }

    public int getIfCountCorrectRate() {
        return ifCountCorrectRate;
    }

    public void setIfCountCorrectRate(int ifCountCorrectRate) {
        this.ifCountCorrectRate = ifCountCorrectRate;
    }

    public int getIfCountPiece() {
        return ifCountPiece;
    }

    public void setIfCountPiece(int ifCountPiece) {
        this.ifCountPiece = ifCountPiece;
    }

    public long getJobStationID() {
        return jobStationID;
    }

    public void setJobStationID(long jobStationID) {
        this.jobStationID = jobStationID;
    }

    public String getRemark() {
        return remark == null ? "" : remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

//    public int getCollectionMode() {
//        return collectionMode;
//    }
//
//    public void setCollectionMode(int collectionMode) {
//        this.collectionMode = collectionMode;
//    }

    public int getProductCategory() {
        return productCategory;
    }

    public void setProductCategory(int productCategory) {
        this.productCategory = productCategory;
    }

    public String getUrl() {
        return url == null ? "" : url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.taskCode);
        dest.writeString(this.taskShortName);
        dest.writeString(this.taskName);
//        dest.writeInt(this.taskAttribute);
//        dest.writeInt(this.relationBillType);
//        dest.writeLong(this.businessTypeID);
        dest.writeInt(this.executorType);
//        dest.writeInt(this.taskMode);
        dest.writeInt(this.ifCountCorrectRate);
        dest.writeInt(this.ifCountPiece);
        dest.writeLong(this.jobStationID);
        dest.writeString(this.remark);
//        dest.writeInt(this.collectionMode);
        dest.writeInt(this.productCategory);
        dest.writeString(this.url);
    }

    public TaskMenuEntity() {
    }

    protected TaskMenuEntity(Parcel in) {
        this.taskCode = in.readString();
        this.taskShortName = in.readString();
        this.taskName = in.readString();
//        this.taskAttribute = in.readInt();
//        this.relationBillType = in.readInt();
//        this.businessTypeID = in.readLong();
        this.executorType = in.readInt();
//        this.taskMode = in.readInt();
        this.ifCountCorrectRate = in.readInt();
        this.ifCountPiece = in.readInt();
        this.jobStationID = in.readLong();
        this.remark = in.readString();
//        this.collectionMode = in.readInt();
        this.productCategory = in.readInt();
        this.url = in.readString();
    }

    public static final Parcelable.Creator<TaskMenuEntity> CREATOR = new Parcelable.Creator<TaskMenuEntity>() {
        @Override
        public TaskMenuEntity createFromParcel(Parcel source) {
            return new TaskMenuEntity(source);
        }

        @Override
        public TaskMenuEntity[] newArray(int size) {
            return new TaskMenuEntity[size];
        }
    };
}
